package us.icitap.cm;

import com.vaadin.ui.MenuBar;

import us.icitap.cm.business.ActionEnum;
import us.icitap.cm.ui.custom.CustMenuBar;


public class CMMenuBar  extends CustMenuBar{

	MenuBar.MenuItem menu =
			this.addItem("Ceshtje policore", null, null);
	
	
	
	private Command menuCommand = new Command() {
        public void menuSelected(MenuItem selectedItem) {
        	if(selectedItem == erRegistrationMenuBar){
        		ui.loadEventReportLayout();
        	}
        	else if(selectedItem == srRegistrationMenuBar){
        		ui.loadSupplementReportLayout();
        	}
        	else if(selectedItem == caseSearchMenuBar){
        		ui.loadDisplayCaseLayout();
        	}
        	else if(selectedItem == policeCodeMenuBar){
        		ui.loadPoliceCodeLayout();
        		
        	}
        }
    };
    
	final MenuBar.MenuItem erRegistrationMenuBar = menu.addItem("Raport Ngjarje i ri", menuCommand);
	final MenuBar.MenuItem srRegistrationMenuBar = menu.addItem("Raport Suplementar i ri", menuCommand);
	final MenuBar.MenuItem caseSearchMenuBar = menu.addItem("Kerko ceshtje", menuCommand);
	final MenuBar.MenuItem policeCodeMenuBar = menu.addItem("Kodi Policor", menuCommand);
	
	final CaseManagementUI ui;
	
	public CMMenuBar(CaseManagementUI caseManagementUI) {
		this.ui = caseManagementUI;
		this.setWidth("100%");
	}
}
